package com.chinasofti.etc.alcohol.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 结果对象
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result {

    private boolean success;

    private String message;

    private Object data;

    public static Result success(){
        return success(null);
    }

    public static Result success(Object data){
        return new Result(true,"执行成功",data);
    }

    public static Result fail(String message){
        return new Result(false,message,null);
    }

}
